package com.zpark.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author zhangbing
 * @date
 * @description TODO 静态资源映射
 */
@Configuration
public class UploadConfig implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        //文件磁盘图片url映射
        //访问的路径
        registry.addResourceHandler("/upload/**")
                /* Locations：文件对应的本地路径 */
                .addResourceLocations("file:F:/t_resume/");
    }
}
